return {
    {
        "stevearc/conform.nvim",
        event = { "BufWritePre" },
        keys = {
            {
                "<leader>lf",
                function()
                    require("conform").format()
                end,
                desc = "格式化当前文档",
            },
            {
                "<leader>cf",
                function()
                    require("conform").format()
                end,
                desc = "格式化当前文档",
            },
        },
        opts = {
            -- Define your formatters
            formatters_by_ft = {
                css = { "prettier" },
                go = { "goimports", "gofumpt" },
                html = { "prettier" },
                javascript = { "prettier", stop_after_first = true },
                json = { "prettier" },
                jsonc = { "prettier" },
                log = { "jq_log_formatter" },
                lua = { "stylua" },
                python = { "isort", "black" },
                typescript = { "prettier" },
                toml = { "taplo" },
                vue = { "prettier" },
                yaml = { "prettier" },
                proto = { "buf" },
                rust = { "rustfmt", lsp_format = "fallback" },
                -- Use the "*" filetype to run formatters on all filetypes.
                ["*"] = { "codespell" },
                -- Use the "_" filetype to run formatters on filetypes that don't
                -- have other formatters configured.
                ["_"] = { "trim_whitespace" },
            },
            -- Set default options
            default_format_opts = {
                lsp_format = "fallback",
            },
            -- Set up format-on-save
            format_on_save = { timeout_ms = 1000, lsp_fallback = true },
            notify_on_error = true,
            -- Conform will notify you when no formatters are available for the buffer
            notify_no_formatters = true,
            -- Customize formatters
            formatters = {
                jq_log_formatter = {
                    command = "jq",
                    args = { "--indent", "4", "-R", "fromjson?" },
                    stdin = true,
                },
                shfmt = {
                    prepend_args = { "-i", "2" },
                },
                prettier = {
                    prepend_args = { "--tab-width", 4, "--print-width", 220 },
                },
            },
        },
        init = function()
            vim.api.nvim_create_autocmd("BufWritePre", {
                pattern = "*",
                callback = function(args)
                    require("conform").format { bufnr = args.buf }
                end,
            })
        end,
    },
}
